const {
  override,
  fixBabelImports,
  addWebpackAlias 
} = require('customize-cra');
const { resolve } = require('path');

module.exports = override(
  /* 针对antd 实现按需打包：根据import来打包 (使用babel-plugin-import) */
  fixBabelImports('import', {
    libraryName: 'antd', 
    libraryDirectory: 'es',
    style: true
  }),
  addWebpackAlias({
    '@': resolve(__dirname, './src')
  })
);